import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.PriorityQueue;
import java.util.Random;


public class Swap {
	private static final int BASE_PROCESS_SIZE = 4;
	private static final int RUN_TIME_LIMIT = 5;
	private static final int MEM_SIZE = 100;
	private static final int[] PHYSICAL_MEM = new int[MEM_SIZE];
	
	private static void emptyMemory() {
		for (int i = 0; i < MEM_SIZE; i++) {
			PHYSICAL_MEM[i] = -1;
		}
	}
	
    public static PriorityQueue<HashMap<String, Number>> Process_generator() {
    	PriorityQueue<HashMap<String, Number>> processList = new PriorityQueue<HashMap<String, Number>>();
        Random r = new Random();
        
        for (int i = 0; i < 26; i++) {
        	HashMap<String, Number> pro = new HashMap<String, Number>();
        	int power = r.nextInt(4);
        	int eachSize = BASE_PROCESS_SIZE * (int) Math.pow(2, power);
        	int time = r.nextInt(RUN_TIME_LIMIT);
            pro.put("processName", i);
            pro.put("total_run_time", time);
            pro.put("run_time", 0);
            pro.put("Each_size", eachSize);
            processList.add(pro);
        }
        return processList;
    }
    
    public static int bestFit(PriorityQueue<HashMap<String, Number>> pQueue) {
    	int swapCount = 0;
    	emptyMemory();
    	ArrayList<HashMap<String, Number>> runList = new ArrayList<HashMap<String, Number>>();
    	
    	return swapCount;
    }
    
    public static void main(String[] args) {
    }
}
